package testes;

import junit.framework.Assert;

import org.junit.Before;
import org.junit.Test;

import codigoBase.RecursiveSearch;

public class RecursiveSearchTeste {


	
private RecursiveSearch recursive_search;
	
	
	@Before
	public void setUp(){
		recursive_search = new RecursiveSearch();
		Assert.assertNotNull(recursive_search);
	}	
	
	
	
	@Test
	public void testRecursiveSearch() {

		int[] sortedArray = {0};
		int[] sortedArray2 = {1,2,3,4,5,6,7};
		int start = 0;
		int end = 0;
		int key = 0;
		Assert.assertEquals(-1, RecursiveSearch.recursiveSearch(sortedArray, start, end, key));
		
		RecursiveSearch.recursiveSearch(sortedArray, 10, 1, key);
		RecursiveSearch.recursiveSearch(sortedArray2, 0, 7, key);
		RecursiveSearch.recursiveSearch(sortedArray2, 0, 7, 7);
		
		
		
}

}